package heuristicas;

import principal.Vertice;

public class H1 implements Heuristica {

    @Override
    public int calcula(Vertice v) {
        int erradas = 0;

        for (int i = 0; i < Vertice.ALT; i++) {
            for (int j = 0; j < Vertice.LARG; j++) {
                if (v.getPuzzle()[i][j] != puzzleDesejado[i][j]) {
                    erradas++;
                }
            }
        }

        return erradas;
    }
}
